import React from 'react';
import { Button, Space } from 'antd';
import { useIdentity } from '../../../hooks/useIdentity';

interface IProps { }

const EditorButton: React.FC<IProps> = () => {
  const [identity] = useIdentity();
  return (
    identity ?
      (<Space size={8} >
        <Button
          type='link'
          onClick={() => {
            window.location.hash = '#/editor'
          }}
        >进入编辑</Button>
      </Space>)
      : null
  )
}

export default EditorButton;